import request from '@/utils/request'

// 查询地区公司列表
export function listSecondary(query) {
  return request({
    url: '/base/secondary/list',
    method: 'get',
    params: query
  })
}

// 查询地区公司详细
export function getSecondary(secondaryId) {
  return request({
    url: '/base/secondary/' + secondaryId,
    method: 'get'
  })
}

// 新增地区公司
export function addSecondary(data) {
  return request({
    url: '/base/secondary',
    method: 'post',
    data: data
  })
}

// 修改地区公司
export function updateSecondary(data) {
  return request({
    url: '/base/secondary',
    method: 'put',
    data: data
  })
}

// 删除地区公司
export function delSecondary(secondaryId) {
  return request({
    url: '/base/secondary/' + secondaryId,
    method: 'delete'
  })
}
